package com.ruoyi.payment.service.impl;

import java.util.List;

import com.ruoyi.payment.domain.SalaryPaymentVO;
import com.ruoyi.slip.domain.SalarySlip;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.payment.mapper.SalaryPaymentMapper;
import com.ruoyi.payment.domain.SalaryPayment;
import com.ruoyi.payment.service.ISalaryPaymentService;

/**
 * 工资发放记录Service业务层处理
 * 
 * @author cxs
 * @date 2025-05-31
 */
@Service
public class SalaryPaymentServiceImpl implements ISalaryPaymentService 
{
    @Autowired
    private SalaryPaymentMapper salaryPaymentMapper;

    /**
     * 查询工资发放记录
     * 
     * @param id 工资发放记录主键
     * @return 工资发放记录
     */
    @Override
    public SalaryPayment selectSalaryPaymentById(Long id)
    {
        return salaryPaymentMapper.selectSalaryPaymentById(id);
    }

    /**
     * 查询工资发放记录列表
     * 
     * @param salaryPayment 工资发放记录
     * @return 工资发放记录
     */
    @Override
    public List<SalaryPaymentVO> selectSalaryPaymentList(SalaryPayment salaryPayment)
    {
        return salaryPaymentMapper.selectList(salaryPayment);
    }

    /**
     * 新增工资发放记录
     * 
     * @param salaryPayment 工资发放记录
     * @return 结果
     */
    @Override
    public int insertSalaryPayment(SalaryPayment salaryPayment)
    {
        return salaryPaymentMapper.insertSalaryPayment(salaryPayment);
    }

    /**
     * 修改工资发放记录
     * 
     * @param salaryPayment 工资发放记录
     * @return 结果
     */
    @Override
    public int updateSalaryPayment(SalaryPayment salaryPayment)
    {
        return salaryPaymentMapper.updateSalaryPayment(salaryPayment);
    }

    /**
     * 批量删除工资发放记录
     * 
     * @param ids 需要删除的工资发放记录主键
     * @return 结果
     */
    @Override
    public int deleteSalaryPaymentByIds(Long[] ids)
    {
        return salaryPaymentMapper.deleteSalaryPaymentByIds(ids);
    }

    /**
     * 删除工资发放记录信息
     * 
     * @param id 工资发放记录主键
     * @return 结果
     */
    @Override
    public int deleteSalaryPaymentById(Long id)
    {
        return salaryPaymentMapper.deleteSalaryPaymentById(id);
    }

    /**
     * 查询工资条
     * @param id
     * @return
     */
    @Override
    public SalarySlip selectSlip(Long id) {
        return salaryPaymentMapper.selectSlip(id);
    }
}
